# coding=utf-8
import codecs
import copy
import json
import logging

class JsonPipeline(object):
    def __init__(self):
        pass

    def process_item(self, item, spider):
        with codecs.open('%s.txt' % item['title'], mode='ab+', encoding='utf-8-sig') as f:
            f.write(item['content'])